const express = require('express')
const router = express.Router()

const uploadInit = require('../router_handle/file/uploadInit')
const uploadChunk = require('../router_handle/file/uploadChunk')
const uploadComplete = require('../router_handle/file/unloadComplete')

const downloadInit = require('../router_handle/file/downloadInit')
const downloadFile = require('../router_handle/file/downloadFile')

// 初始化上传
router.use('/upload/init', uploadInit)

// 分片上传
router.use('/upload/chunk', uploadChunk)

// 完成上传
router.use('/upload/complete', uploadComplete)

// 初始化下载
router.use('/download/init', downloadInit)

router.use('/download/chunk', downloadInit)

router.use('/download/file', downloadFile)

module.exports = router
